#ifndef ITEMWIDGET_H
#define ITEMWIDGET_H

#include <QWidget>
#include <QPoint>
#include "common.h"

class QLabel;


class ItemWidget : public QWidget
{
    Q_OBJECT
public:
    explicit ItemWidget(ObjectInfo param, QWidget *parent = 0);
    ObjectInfo get_param();
    ~ItemWidget();
signals:

    void mouseDoubleClick(QString objectname); //双击事件
    void mouseRelease(ObjectInfo, QPoint);//鼠标释放

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void mouseDoubleClickEvent(QMouseEvent *event);

private:
    QLabel *lab_name;
    ObjectInfo m_param;
};

#endif // ITEMWIDGET_H
